import { del, get,post, put } from "./http"


export const itemPropsType = [
  {name:'文本',key:'text'},
  {name:'数字',key:'number'},
  {name:'字典',key:'dict'},
]
 
/**
 * 列表查询机源属性
 * @param {*} params 
 * @returns 
 */
export const listProps= (params)=>{
  const url = `/api/props/list`
  return get(url,params)
}
/**
 * 删除机源属性
 * @param {*} id 
 * @returns 
 */
export const removeProps= (id)=>{
  const url = `/api/props/${id}`
  return del(url)
}
/**
 * 保存或者更新机源属性
 * @param {*} data 
 * @returns 
 */
export const saveProps= (data)=>{
  const url = `/api/props`
  return post(url,data)
}